
package shangsi.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dzd
 * @date 2021-12-17
 */
@RestController
//支持配置动态刷新
@RefreshScope
public class NacosConfigController {

    @Value("${config.info:}")
    private String configInfo;

    @RequestMapping("/config/info2")
    public String getConfigInfo(){

        System.out.println("dddddddd");
        return configInfo;

    }
}
